package com.itheima.define;

import java.util.Scanner;

public class ArrayDemo3 {
    public static void main(String[] args) {
        Scanner r = new Scanner(System.in);
        double[] score = new double[6];
        for (int i = 0; i < score.length; i++) {
            System.out.println("请输入第" + (i + 1) + "位评委的评分：");
            double insert = r.nextDouble();
            score[i] = insert;
        }
        double sum = 0;
        for (int i = 0; i < score.length; i++) {
            sum += score[i];
        }
        System.out.println("选手最终得分是：" + sum / score.length);
    }
}
